//
//  ImageListVC.m
//  COJoke
//
//  Created by carlosk on 14/12/23.
//  Copyright (c) 2014年 carlosk. All rights reserved.
//

#import "ImageListVC.h"
#import "ImageCell.h"
@interface ImageListVC ()
@property(nonatomic,strong)IBOutlet UITableView *tableV;
@property(nonatomic,strong)NSMutableArray  * datas;
@end

@implementation ImageListVC

- (void)viewDidLoad {
    [super viewDidLoad];
//    获取图片
    self.datas = [NSMutableArray array];
    self.tableV.frame = self.view.frame;
    self.tableV.height = kFBaseHeightNoStatusNoNav;
    self.tableV.y = kFBaseNavHeight + kFBaseStatusHeight;
    //显示
    [self.tableV fillWithItems:self.datas withFillCellBlock:nil withCOBaseCellClass:[ImageCell class]];
    [self doGetImageList];
//    __block typeof(self)bSelf = self;
    
//    [self.tableV setOnClickCellBlock:^(NSIndexPath *indexPath, NewModel *item) {
//        WebVC *vc = [[WebVC alloc] init];
//        vc.model = item;
//        [bSelf.navigationController pushViewController:vc animated:YES];
//    }];
}


- (void)doGetImageList{
    [self.datas removeAllObjects];
    __block typeof(self)bSelf = self;
    
    [HttpService doGetImageList:self.title withBlock:^(NSArray *articleList) {
        NSLog(@"result = %@",articleList);
        [bSelf.datas removeAllObjects];
        [bSelf.datas addObjectsFromArray:articleList];
        [bSelf.tableV reloadData];
    }];
}
@end
